https://linux.die.net/man/1/iostat
IO statistics
/proc/diskstats
/sys/block/<disk>/stat
/sys/block/<disk>/<partiton>/stat
-t Print the time for each report displayed. The timestamp format may
depend on the value of the S_TIME_FORMAT environment variable
-x Display extended statistics.
The interval parameter '-d' specifies the amount of time in seconds between
each report. The count parameter can be specified in conjunction with the
interval parameter. If the count parameter is specified, the value of count
determines the number of reports generated at interval seconds apart. If the
interval parameter is specified without the count parameter, the iostat command
generates reports continuously.
iostat -d 2 6 每隔 2s 报告一次,打印 6 次报告
iostat -d 2 每隔 2s 报告一次,没有次数限制,连续打印
The device report provides statistics on a per physical device or partition
basis. Block devices and partitions for which statistics are to be displayed
may be entered on the command line. If no device nor partition is entered,
then statistics are displayed for every device used by the system, and
providing that the kernel maintains statistics for it. If the ALL keyword is
given on the command line, then statistics are displayed for every device
defined by the system, including those that have never been used.
Transfer rates are shown in 1K blocks by default, unless the environment
variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
The report may show the following fields, depending on the flags used:
Device This column gives the device (or partition) name as listed
in the /dev directory.
tps Indicate the number of transfers per second that were issued
to the device.
A transfer is an I/O request to the device. Multiple logical
requests can be combined into a single I/O request to the device.
A transfer is of indeterminate size.
Blk_read/s (kB_read/s, MB_read/s)
Indicate the amount of data read from the device expressed in
a number of blocks (kilobytes, megabytes) per second. Blocks
are equivalent to sectors and therefore have a size of 512 bytes.
Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s)
Indicate the amount of data written to the device expressed in
a number of blocks (kilobytes, megabytes) per second.
Blk_read (kB_read, MB_read)
The total number of blocks (kilobytes, megabytes) read.
Blk_wrtn (kB_wrtn, MB_wrtn)
The total number of blocks (kilobytes, megabytes) written.
r/s The number (after merges) of read requests completed per second
for the device.
w/s The number (after merges) of write requests completed per second
for the device.
sec/s (kB/s, MB/s)
The number of sectors (kilobytes, megabytes) read from or written
to the device per second.
rsec/s (rkB/s, rMB/s)
The number of sectors (kilobytes, megabytes) read from the device
per second.
wsec/s (wkB/s, wMB/s)
The number of sectors (kilobytes, megabytes) written to the device
per second.
rqm/s The number of I/O requests merged per second that were queued to
the device.
rrqm/s The number of read requests merged per second that were queued to
the device.
wrqm/s The number of write requests merged per second that were queued to
the device.
%rrqm The percentage of read requests merged together before being sent
to the device.
%wrqm The percentage of write requests merged together before being sent
to the device.
areq-sz The average size (in kilobytes) of the I/O requests that were issued
to the device.
Note: In previous versions, this field was known as avgrq-sz and was
expressed in sectors.
rareq-sz The average size (in kilobytes) of the read requests that were issued
to the device.
wareq-sz The average size (in kilobytes) of the write requests that were issued
to the device.
await The average time (in milliseconds) for I/O requests issued to the device
to be served. This includes the time spent by the requests in queue and
the time spent servicing them.
r_await The average time (in milliseconds) for read requests issued to the device
to be served. This includes the time spent by the requests in queue and
the time spent servicing them.
w_await The average time (in milliseconds) for write requests issued to the device
to be served. This includes the time spent by the requests in queue and
the time spent servicing them.
aqu-sz The average queue length of the requests that were issued to the device.
Note: In previous versions, this field was known as avgqu-sz.
svctm The average service time (in milliseconds) for I/O requests that were
issued to the device.
Warning!
Do not trust this field any more.
This field will be removed in a future sysstat version.
%util Percentage of elapsed time during which I/O requests were issued
to the device (bandwidth utilization for the device).
Device saturation occurs when this value is close to 100% for devices
serving requests serially. But for devices serving requests in parallel,
such as RAID arrays and modern SSDs, this number does not reflect their
performance limits.